package com.alisls.demo.cas.ics.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

import javax.servlet.http.HttpSession;

/**
 * 登出管理
 *
 * @author Ke Wang
 */
@Controller
public class LogoutController {

    /**
     * 登出
     *
     * @param session 会话
     * @return 结果
     */
    @RequestMapping("/logout")
    public String logout(HttpSession session) {
        session.invalidate();
        return "redirect:http://node4:9100/cas-server/logout?service=http://node4:9100/cas-server";
    }

}
